package com.electric.common;

import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;

public interface Contains {
	int PAGE_SIZE = 10;
	int MOVE_PAGE_SIZE = 8;
	int BATCH_SIZE = 50;
	String YEAR_FMT = "yyyy";
	String YEAR_FMT_MYSQL = "%Y";
	String MONTH_FMT = "yyyy-MM";
	String MONTH_FMT_MYSQL = "%Y-%m";
	String DAY_FMT = "yyyy-MM-dd";
	String DAY_FMT_MYSQL = "%Y-%m-%d";
	String TIME_FMT = "yyyy-MM-dd HH:mm:ss";
	Pattern phonePattern = Pattern.compile("/^[1][3,4,5,7,8][0-9]{9}$/");
	SimpleDateFormat YEAR_FMT_SDF = new SimpleDateFormat(YEAR_FMT);
	SimpleDateFormat MONTH_FMT_SDF = new SimpleDateFormat(MONTH_FMT);
	SimpleDateFormat DAY_FMT_SDF = new SimpleDateFormat(DAY_FMT);
	SimpleDateFormat TIME_FMT_SDF = new SimpleDateFormat(TIME_FMT);
	
	String VOLTAGE_LOSS_CODE = "VOLTAGE_LOSS";
	
	// 故障类型的主键和CODE关系
	Map<String,String> REPAIR_TYPE_ID_CODE = new HashMap<String,String>();
	Map<String,String> REPAIR_TYPE_CODE_ID = new HashMap<String,String>();
	
	String[][] VOLTAGE_LOSS_PARAM = new String[][]{
		// 失压前的日期1对应的各个电量参数
		{"beforeLossVoltageTotal1","beforeLossVoltageSharp1","beforeLossVoltagePeak1","beforeLossVoltageOffPeak1"},
		// 失压前的日期2对应的各个电量参数
		{"beforeLossVoltageTotal2","beforeLossVoltageSharp2","beforeLossVoltagePeak2","beforeLossVoltageOffPeak2"},
		// 恢复后的日期1对应的各个电量参数
		{"afterRepairTotal1","afterRepairSharp1","afterRepairPeak1","afterRepairOffPeak1"},
		// 恢复后的日期2对应的各个电量参数
		{"afterRepairTotal2","afterRepairSharp2","afterRepairPeak2","afterRepairOffPeak2"},
		// 四个日期
		{"beforeLossVoltageDate1","beforeLossVoltageDate2","afterRepairDate1","afterRepairDate2"},
		// 两个倍率
		{"CTRatio","PTRatio"}
	};
	
	// VOLTAGE_LOSS_PARAM 对应的中文描述
	String[][] VOLTAGE_LOSS_PARAM_CN = new String[][]{
		{"失压前日期1对应的电量[总]","失压前日期1对应的电量[尖]","失压前日期1对应的电量[峰]","失压前日期1对应的电量[谷]"},
		
		{"失压前日期2对应的电量[总]","失压前日期2对应的电量[尖]","失压前日期2对应的电量[峰]","失压前日期2对应的电量[谷]"},

		{"恢复后日期1对应的电量[总]","恢复后日期1对应的电量[尖]","恢复后日期1对应的电量[峰]","恢复后日期1对应的电量[谷]"},
		
		{"恢复后日期2对应的电量[总]","恢复后日期2对应的电量[尖]","恢复后日期2对应的电量[峰]","恢复后日期2对应的电量[谷]"},
		
		{"失压前日期1","失压前日期2","恢复后日期1","恢复后日期2"},
		
		{"CT倍率","PT倍率"}
	};
	
	// VOLTAGE_LOSS_PARAM 对应的必输校验
	boolean[][] VOLTAGE_LOSS_PARAM_REQUIRED = new boolean[][]{
		{true,true,true,true},
		
		{true,true,true,true},

		{true,true,true,true},
		
		{true,true,true,true},
		
		{true,true,true,true},
		
		{true,true},
	};
}
